#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef struct msg{
    int id;
    char name[100];
}msg_t;

void init_msg(msg_t* msg){
    msg->id = 1;
    memset(msg->name,0,sizeof(msg->name));
    return;
}

int main(){
    msg_t* num = (msg_t*)malloc(sizeof(msg_t));
    if(NULL == num){
        printf("malloc failed\n");
    }

    init_msg(num);
    printf("%d\n",num->id);
}
